home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / TwoRings.dxr / 00055_foundation cards.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  1.1 KB  |  34 lines

  1. property spriteNum, basevalue
  2. global foundation, hotcard, equal
  3.  
  4. on beginSprite
  5.   foundation.addProp(makesymbol(spriteNum), new(script("foundation object"), []))
  6.   foundation[makesymbol(spriteNum)].addCard(new(script("card"), spriteNum))
  7.   basevalue = foundation[makesymbol(spriteNum)].getlastcard().rank
  8. end
  9.  
  10. on mouseEnter
  11.   if the clickOn <> 0 then
  12.     if sprite(the clickOn).moveableSprite = 1 then
  13.       if basevalue = "six" then
  14.         if (getlist(the clickOn).rankvalue = (foundation[makesymbol(spriteNum)].getlastcard().rankvalue - 1)) and (getlist(the clickOn).suit = foundation[makesymbol(spriteNum)].getlastcard().suit) then
  15.           equal = 1
  16.           hotcard = spriteNum
  17.         end if
  18.       else
  19.         if basevalue = "seven" then
  20.           if (getlist(the clickOn).rankvalue = (foundation[makesymbol(spriteNum)].getlastcard().rankvalue + 1)) and (getlist(the clickOn).suit = foundation[makesymbol(spriteNum)].getlastcard().suit) then
  21.             equal = 1
  22.             hotcard = spriteNum
  23.           end if
  24.         end if
  25.       end if
  26.     end if
  27.   end if
  28. end
  29.  
  30. on mouseLeave
  31.   equal = 0
  32.   hotcard = 0
  33. end
  34.